<div class="depot-form">
  <%= error_messages_for 'user' %>
  <fieldset>
    <legend>Enter User Details</legend>
    <% form_for :user do |form| %>
      <p>
        <label for="user_first_name" >First Name:</label>
        <%= form.text_field :first_name, :size => 40 %>
      </p>
      <p>
        <label for="user_last_name" >Last Name:</label>
        <%= form.text_field :last_name, :size => 40 %>
      </p>
      <p>
        <label for="user_name" >Login ID:</label>
        <%= form.text_field :name, :size => 40 %>
      </p>
      <p>
        <label for="user_password" >Password:</label>
        <%= form.password_field :password, :size => 40 %>
      </p>
      <p>
        <label for="user_password_confirmation" >Confirm:</label>
        <%= form.password_field :password_confirmation, :size => 40 %>
      </p>
      <p>
        <label for="user_role" >Role:</label>
        <%= 
            @roles = Role.find(:all).map { |r| [r.name, r.id]}
            form.select :role_id, @roles 
        %>
      </p>
      <%= submit_tag "Add User" , :class => "submit" %>
    <% end %>
  </fieldset>
</div>